<template>
<div class="top">
    <h2>{{ name }},早上好</h2>
    <div class="tem">
        <h4>今日温度:27</h4>
        <span>{{ Math.floor(year)+1970 }}-{{ Math.ceil(mon) }}-{{ day }}</span>
        &emsp;
        <span>星期{{ week }}</span>
    </div>
    <div class="todo">
        <h4>待审批</h4>
        <h1>13</h1>&emsp;较昨日&nbsp; <span></span>&nbsp;&nbsp; 8
    </div>
    <div class="dat">
        <h4>日程</h4>
        <h1>12</h1>&emsp;较昨日 &nbsp;<span></span>&nbsp;&nbsp;5
    </div>
    
</div>
<div class="top-right">
        <img src="../../assets/组 13@2x.png" alt="">
    </div>
</template>

<script setup>
const name='陈思思'
const time=Date.now()
const year=time/1000/60/60/24/365
const mon=time/1000/60/60/24/365/12
const day=new Date().getDate()
let week=new Date().getDay()
if(week==0){
    week='天'
}
</script>

<style scoped lang="less">
.hmoe{
    width: 100%;
    height: 100%;
    
}
.top h2{
    width: 200px;
    line-height: 0px;

}
.top{
    width: calc(73% - 50px);
    height: 130px;
    background: #fff;
    padding-left: 50px;

    overflow: hidden;
    float: left;
    margin-bottom: 10px;
}
.tem{
    width: 180px;
    // margin-top: 60px;
    float: left;
    text-align: right;
    background: url(../../assets/天气-54_64.png) no-repeat -20px 10px;
}
.tem span{
    font-size: 12px;
    color: #838181;
}
.todo{
    width: 130px;
    float: left;
    margin-left: 150px;
    position: relative;
}
.todo h1{
    display: inline-block;
    line-height: 0px;
    font-size: 16px;
}
.todo span{
    height: 0;
    border: 5px solid transparent;
    border-bottom: 5px solid red;
    position: absolute;
    top:74%;
    left: 68%;

}
.dat{
    width: 130px;
    float: right;
    position: relative;
}
.dat h1{
    display: inline-block;
    line-height: 0px;
    font-size: 16px;

}
.dat span{
    height: 0;
    border: 5px solid transparent;
    border-top: 5px solid green;
    position: absolute;
    top:74%;
    left: 68%;

}
.top-right{
    width: 23.6%;
    height: 130px;
    background: #fff;
    float: right;
}
.top-right img{
    width: 320px;
    height: 100%;
}
h4{
    line-height: 10px;
}
</style>
